function cascadeCheck(thiz){
	this.tableObj = document.getElementById('ec');
	this.nextTD = thiz.parentNode.nextSibling;
	var str = getALLhrefFromTable();
	document.forms[0].transtionId.value = thiz.value;
	document.forms[0].check.value = thiz.checked;
	document.forms[0].action = PROJECT_NAME_PATH_MYCE+"/charge_cashieringAction.do?method=cascadeChecked"+str;
	document.forms[0].submit();
}
function getALLhrefFromTable(){
	var str = "";
	var mytable = document.getElementById('ec');
	var tables = mytable.getElementsByTagName('TABLE');
	for(var i = 0 ; i < tables.length; i++){
		var a = tables[i].getElementsByTagName('A');
		if(a.length == 1){
			str = splithref(a[0].href ,str);
		}
	}
	return str;
	//alert('last:'+str);
}
function splithref( hrefs ,strs){
	var indexs = hrefs.indexOf("&");
	var str = hrefs.substr(indexs+1);
	var arrays = str.split("&");
	for(var i = 0 ; i < arrays.length ; i++){
		//alert(strs +"\n"+arrays[i]);
		if(strs.indexOf(arrays[i]) != -1)
			continue;
		else
			strs = strs +"&"+arrays[i];
	}
	return strs;
}

